#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    this->setWindowTitle("这是窗口的标题");

    QPushButton *pushButton = new QPushButton(this);
    pushButton->setText("按钮");
    pushButton->setWindowTitle("修改标题");
}

Widget::~Widget()
{
    delete ui;
}

